home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
cat3
/
GetCapStyl.3
< prev
next >
Wrap
Text File
|
1994-09-20
|
3KB
|
133 lines
Tk_GetCapStyle(3) Tk Library Procedures
_________________________________________________________________
NAME
Tk_GetCapStyle, Tk_NameOfCapStyle - translate between
strings and cap styles
SYNOPSIS
#include <tk.h>
int
Tk_GetCapStyle(_i_n_t_e_r_p, _s_t_r_i_n_g, _c_a_p_P_t_r)
char *
Tk_NameOfCapStyle(_c_a_p)
ARGUMENTS
Tcl_Interp *_i_n_t_e_r_p (in) Interpreter to use for
error reporting.
char *_s_t_r_i_n_g (in) String containing name of
cap style: one of
```butt'', ``projecting'',
or ``round''.
int *_c_a_p_P_t_r (out) Pointer to location in
which to store X cap style
corresponding to _s_t_r_i_n_g.
int _c_a_p (in) Cap style: one of CapButt,
CapProjecting, or CapRound.
_________________________________________________________________
DESCRIPTION
Tk_GetCapStyle places in *_c_a_p_P_t_r the X cap style correspond-
ing to _s_t_r_i_n_g. This will be one of the values CapButt, Cap-
Projecting, or CapRound. Cap styles are typically used in X
graphics contexts to indicate how the end-points of lines
should be capped. See the X documentation for information
on what each style implies.
Under normal circumstances the return value is TCL_OK and
_i_n_t_e_r_p is unused. If _s_t_r_i_n_g doesn't contain a valid cap
style or an abbreviation of one of these names, then an
error message is stored in _i_n_t_e_r_p->_r_e_s_u_l_t, TCL_ERROR is
returned, and *_c_a_p_P_t_r is unmodified.
Tk_NameOfCapStyle is the logical inverse of Tk_GetCapStyle.
Given a cap style such as CapButt it returns a statically-
allocated string corresponding to _c_a_p. If _c_a_p isn't a legal
cap style, then ``unknown cap style'' is returned.
Tk 1
Tk_GetCapStyle(3) Tk Library Procedures
KEYWORDS
butt, cap style, projecting, round
Tk 2